@include('admin.layout.css')
@include('admin.layout.js')




<div class="layui-form" lay-filter="layuiadmin-app-form-list" id="layuiadmin-app-form-list" style="padding: 20px 30px 0 0;">


    <div class="layui-form-item">
        <label class="layui-form-label"> 用户等级</label>
        <div class="layui-input-inline">
            <input type="radio" name="user_level" value="0" title="普通用户" @if($info['user_level'] == '0') checked @endif>
            <input type="radio" name="user_level" value="10" title="一星用户" @if($info['user_level'] == '10') checked @endif>
            <input type="radio" name="user_level" value="20" title="二星用户" @if($info['user_level'] == '20') checked @endif>
            <input type="radio" name="user_level" value="30" title="三星用户" @if($info['user_level'] == '30') checked @endif>
            <input type="radio" name="user_level" value="40" title="四星用户" @if($info['user_level'] == '40') checked @endif>
            <input type="radio" name="user_level" value="50" title="五星用户" @if($info['user_level'] == '50') checked @endif>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label"> 密码</label>
        <div class="layui-input-block">
            <input type="text"  name="password"  placeholder="请输入 密码(为空不修改)" autocomplete="off" class="layui-input" >
        </div>
    </div>



    <input type="hidden" name="user_id" value="{{$info['user_id']}}">


    <div class="layui-form-item layui-hide">
        <input type="button" lay-submit lay-filter="submit" id="submit" value="确认">
        <input type="button" lay-submit lay-filter="layuiadmin-app-form-edit" id="layuiadmin-app-form-edit" value="取消">
    </div>

</div>


<script>




    layui.use(['laydate','form'], function() {
        let form = layui.form;



        form.on('submit(submit)', function(data){
            Api.add("{{route('admin.users.edit')}}",data.field,function(res){
                if (res.code !== 200){
                    Utils.errorToast(res.msg);
                    return;
                }
            });
        });


    });
</script>
